package com.zzyl.exception;


import com.zzyl.base.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class TestExceptionHandler {

    @ExceptionHandler(TestException.class)
    public ResponseResult<Object> test(TestException testException){
        testException.getLocalizedMessage();

        return ResponseResult.error(testException.getTestEnum());
    }
}
